package com.xuetang9.fujian.mychat.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @author: fujian
 * @description:
 * @date: 2021/5/11 21:26
 * @version: V1.0
 * @package: com.xuetang9.fujian.mychat.entity
 **/
@SuppressWarnings("all")
public class Message implements Serializable {
    private String fromUserName;
    private String toUserNickName;
    private LocalDateTime sendTime;
    private String content;



    public String getFromUserName() {
        return fromUserName;
    }

    public void setFromUserName(String fromUserName) {
        this.fromUserName = fromUserName;
    }

    public String getToUserNickName() {
        return toUserNickName;
    }

    public void setToUserNickName(String toUserNickName) {
        this.toUserNickName = toUserNickName;
    }

    public LocalDateTime getSendTime() {
        return sendTime;
    }

    public void setSendTime(LocalDateTime sendTime) {
        this.sendTime = sendTime;
    }

    public String getContent() {
        return content;
    }

    public String getStrSendTime(){
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy年MM月dd日 HH:mm:ss");
        return formatter.format(getSendTime());
    }

    public void setContent(String content) {
        this.content = content;
    }
}
